import axios from "@/utils/http"

// 根据id获取考试
export function getExam(){
    return axios({
        url:"/fore/question/nowExam",
        method:"get"
    })
}

//获取历史考试
export function getHistoryExam(){
    return axios({
        url:"/fore/question/historyExam",
        method:"get"
    })
}

//获取会议
export function getMeet(){
    return axios({
        url:"/fore/meeting/listByUserId",
        method:"get"
    })
}


//获取收藏
export function getCollect(page:any){
    return axios({
        url:"/fore/collection/list",
        method:"post",
        headers:{
            "Content-Type": "application/json"
        },
        data:{
	"limit": 6,
	"page": page,
	"startIndex": 0
}
    })
}

// 取消收藏
export function cancelCollect(id:any){
    return axios({
        url:"/fore/collection/delete",
        method:"get",
        params:{
            id:id
        }
    })
}


//订单列表
export function orderList(){
    return axios({
        url:"/fore/orderList/list",
        method:"post",
       headers:{
        "Content-Type":"application/json"
       }
    })
}

// 已支付支付订单
export function hasPost(){
    return axios({
        url:"/fore/orderList/paid",
        method:"post",
       headers:{
        "Content-Type":"application/json"
       }
    })
}


//未支付订单
export function noPost(){
    return axios({
        url:"/fore/orderList/unpaid",
        method:"post",
       headers:{
        "Content-Type":"application/json"
       }
    })
}


// 获取课程表
export function getClassList(){
    return axios({
        url:"/fore/class/myClass",
        method:"get"
    })
}